const mysql = require("mysql2");

// 创建数据库连接
const connection = mysql.createConnection({
  hostname: "localhost",
  post: 3306,
  database: "coderhub",
  user: "root",
  password: "",
});

// 执行SQL语句
const statement = `SELECT * FROM products WHERE price > 6000`;

connection.query(statement, (err, results, fields) => {
  console.log(results);
  connection.end();
});
